<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
    <meta name="generator" content="Jekyll v3.8.5">
    <title>Dashboard Template · Bootstrap</title>

    <link rel="canonical" href="https://getbootstrap.com/docs/4.3/examples/dashboard/">

    <!-- Bootstrap core CSS -->
    <link href="asserts/css/bootstrap.min.css" th:href="@{/asserts/css/bootstrap.min.css}" rel="stylesheet"
          integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">


    <style>
        .bd-placeholder-img {
            font-size: 1.125rem;
            text-anchor: middle;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        @media (min-width: 768px) {
            .bd-placeholder-img-lg {
                font-size: 3.5rem;
            }
        }
    </style>
    <!-- Custom styles for this template -->
    <link href="asserts/css/dashboard.css" th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">
    <style type="text/css">/* Chart.js */
    @-webkit-keyframes chartjs-render-animation {
        from {
            opacity: 0.99
        }
        to {
            opacity: 1
        }
    }

    @keyframes chartjs-render-animation {
        from {
            opacity: 0.99
        }
        to {
            opacity: 1
        }
    }

    .chartjs-render-monitor {
        -webkit-animation: chartjs-render-animation 0.001s;
        animation: chartjs-render-animation 0.001s;
    }</style>
    <link href="chrome-extension://iihgchombimnadbbapofogflgbifgbgl/content/css/jlzs.css" rel="stylesheet"
          type="text/css">
    <link href="chrome-extension://iihgchombimnadbbapofogflgbifgbgl/content/css/select.css" rel="stylesheet"
          type="text/css">
    <link href="chrome-extension://iihgchombimnadbbapofogflgbifgbgl/content/css/input.css" rel="stylesheet"
          type="text/css">
    <link href="chrome-extension://iihgchombimnadbbapofogflgbifgbgl/content/css/checkbox.css" rel="stylesheet"
          type="text/css">
</head>
<body style="">
<!--引入抽取的片段toobar
  模板名()thymeleaf会按照前后缀配置进行解析::片段名
  th:inclue, th:replace, th:insert 它们有区别,注意使用场景
  使用属性抽取的时候可以不用写~{}
  但是使用行内写法[[~{}]]必须加上 ~{}
  代码复用-->
<div th:replace="~{/commons/bar::topbar}"></div>
<div class="container-fluid">
    <div class="row">
        <!--        引入侧边栏导航片段-->
        <div th:replace="/commons/bar::#leftBar(activeUrl='emps')"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
            <div class="chartjs-size-monitor"
                 style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: hidden; pointer-events: none; visibility: hidden; z-index: -1;">
                <div class="chartjs-size-monitor-expand"
                     style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;">
                    <div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div>
                </div>
                <div class="chartjs-size-monitor-shrink"
                     style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;">
                    <div style="position:absolute;width:200%;height:200%;left:0; top:0"></div>
                </div>
            </div>
            <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
                <h1 class="h2">添加员工</h1>
                <div class="btn-toolbar mb-2 mb-md-0">
                    <div class="btn-group mr-2">
                        <button type="button" class="btn btn-sm btn-outline-secondary">Share</button>
                        <button type="button" class="btn btn-sm btn-outline-secondary">Export</button>
                    </div>
                    <button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle">
                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
                             stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
                             class="feather feather-calendar">
                            <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
                            <line x1="16" y1="2" x2="16" y2="6"></line>
                            <line x1="8" y1="2" x2="8" y2="6"></line>
                            <line x1="3" y1="10" x2="21" y2="10"></line>
                        </svg>
                        This week
                    </button>
                </div>
            </div>

            <div class="table-responsive">
                <form action="#" th:action="@{/user/emp}" method="post">
                    <input type="hidden" name="id" th:if="${employee!=null}" th:value="${employee.id}">
                    <input type="hidden" name="_method" th:value="${employee!=null}?'PUT'">
                    <div class="form-group">
                        <label for="userName">用户名</label>
                        <input type="text" class="form-control" name="lastName"
                               th:value="${employee!=null}?${employee.lastName}"
                               id="userName" placeholder="用户名">
                    </div>
                    <!--             <div class="form-group">
                                     <label for="password">密码</label>
                                     <input type="password" class="form-control" name="password" id="password" placeholder="密码" >
                                 </div>-->
                    <div class="form-group">
                        <label for="exampleFormControlInput1">邮箱地址</label>
                        <input type="email" class="form-control" id="exampleFormControlInput1" name="email"
                               th:value="${employee!=null}?${employee.email}"
                               placeholder="name@example.com">
                    </div>
                    <div class="form-group">
                        <label for="exampleFormControlSelect1">请选择部门</label>
                        <select class="form-control" id="exampleFormControlSelect1" name="department.id">
                            <option th:selected="${employee!=null}?${dep.id==employee.department.id}"
                                    th:each="dep:${departments}"
                                    th:value="${dep.id}">[[${dep.departmentName}]]
                            </option>
                        </select>
                    </div>
                    <div class="form-group">

                        <div class="form-check">
                            <input class="form-check-input" type="radio" name="gender" id="exampleRadios1" value="男"
                                   th:checked="${employee!=null}?${employee.gender.equals('男')}"
                                   checked>
                            <label class="form-check-label" for="exampleRadios1">
                                男
                            </label>
                        </div>
                        <div class="form-check">
                            <input class="form-check-input" type="radio" name="gender" id="exampleRadios2" value="女"
                                   th:checked="${employee!=null}?${employee.gender.equals('女')}">
                            <label class="form-check-label" for="exampleRadios2">
                                女
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <button type="submit" class="btn btn-primary" th:text="${employee!=null}?'更新':'提交'">提 交
                        </button>
                    </div>
                </form>
            </div>
        </main>
    </div>
</div>
<script src="asserts/css/jquery-3.3.1.slim.min.js" th:src="@{/asserts/css/jquery-3.3.1.slim.min.js}"
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
        crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="asserts/js/vendor/jquery-slim.min.js"><\/script>')</script>
<script src="asserts/css/bootstrap.bundle.min.js" th:src="@{/asserts/css/bootstrap.bundle.min.js}"
        integrity="sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o"
        crossorigin="anonymous"></script>
<script src="asserts/css/feather.min.js" th:src="@{/asserts/css/feather.min.js}"></script>
<script src="asserts/css/Chart.min.js" th:src="@{/asserts/css/Chart.min.js}"></script>
<script src="asserts/css/dashboard.js" th:src="@{/asserts/css/dashboard.js}"></script>

<div id="jlzsCpn_0_component_0" class=" jlzs-container jlzs-gate" style="width: auto; height: 674px;"></div>
</body>
</html>